package com.yincheng.oes.business.model.result;

import com.yincheng.oes.business.consist.ResultCodeEnum;

/**
 * @Author: yangsy
 * @Contact: 446948434@qq.com
 * @Date: 2021/8/27 21:29
 * @Version: 1.0
 * @Description: 业务响应返回实体
 */
public class BusinessResult {

    /**
     * 返回码，0：成功
     */
    private Integer code;

    private String message;

    private Object data;

    public BusinessResult() {
    }

    public BusinessResult(ResultCodeEnum codeEnum) {
        this.code = codeEnum.getCode();
        this.message = codeEnum.getMessage();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
